﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using JCode.DALFactory;
using JCode.IDAL;
using JCode.Model;
namespace JCode.BLL
{

    public class Category
    {
        private readonly ICategory dal = DataAccess.CreateCategory();

        public void Add(JCode.Model.CategoryInfo model)
        {
            dal.Add(model);
            
        }

        public DataSet GetList()
        {
            return dal.GetList();
        }

        public JCode.Model.CategoryInfo GetModel(int categoryId)
        {

            return dal.GetModel(categoryId);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(JCode.Model.CategoryInfo model)
        {
            dal.Update(model);
        }
    }
}
